package edu.ccut.saturn.workflow.finishTaskModule.code;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IParameterContext;
import edu.ccut.saturn.workflow.model.ManInfo;
import edu.ccut.saturn.workflow.model.WorkFlowInfo;

public class GetRequestPath extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		WorkFlowInfo workFlowInfo = (WorkFlowInfo)parameterContext.getParameterValue(0);
		String activity_define_id  = (String)parameterContext.getParameterValue(1);
		//根据AfterRequest得到path
		String path =((ManInfo)workFlowInfo.getActivityInfoById(activity_define_id)).getAfterRequest();
		if(path==null||"".equals(path)){
			path = "/edu.ccut.saturn.workflow/publicModule/page/finishWorkFlowActivitySucess.jsp";
		}
		
		parameterContext.setParameter(2, path);
	}
}